package chapter3.No3_1_等待和通知机制.m实战等待通知之交叉备份;

/**
 * 主要依靠 volatile boolean flag = false 的相互切换
 * Created by Administrator on 2016/11/20.
 */
public class Main {
    public static void main(String[] args) throws InterruptedException {
        DBTools tools = new DBTools();
        for(int i = 0;i < 5; i++) {
            ThreadA a = new ThreadA(tools);
            ThreadB b = new ThreadB(tools);
            a.start();
            b.start();
        }
    }
}
